--------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/12b_AppendixTables_log.txt
  log type:  text
 opened on:  25 Jun 2026, 13:02:15
r; t=0.00 13:02:15

. 
. include "_OutcomeLabels.do"

. /*==============================================================================
>   _OutcomeLabels.do  (helper, not run on its own)
> 
>   Defines polished, publication-ready labels for every outcome that appears
>   in figures and tables. Labels use the macro pattern `lbl_<outcome>`.
>   Visualization do files `include` this file and reference `lbl_<outcome>`
>   to print a pretty label rather than the raw Stata variable name.
> 
>   Categorical/binary indicators are suffixed with "[=1]" so the reader sees
>   what a unit change means; counts and continuous variables get explicit
>   units; standardized indices are flagged "(SD)".
> 
>   Sandra Rozo
> ==============================================================================*/
. 
. * ---- Economic well-being -----------------------------------------------------
. local lbl_jeea_index_wellbeing  "Well-being index (SD)"
r; t=0.00 13:02:15

. local lbl_labour_income         "Log monthly labor income"
r; t=0.00 13:02:15

. local lbl_gasto_capita          "Log per-capita HH consumption"
r; t=0.00 13:02:15

. local lbl_income_maxhh          "Log HH-max labor income"
r; t=0.00 13:02:15

. local lbl_employed              "Employed [=1]"
r; t=0.00 13:02:15

. 
. * ---- Labor ------------------------------------------------------------------
. local lbl_jeea_index_labor      "Labor index (SD)"
r; t=0.00 13:02:15

. local lbl_formal                "Formal employment [=1]"
r; t=0.00 13:02:15

. local lbl_hora_semana           "Log weekly hours (salaried)"
r; t=0.00 13:02:15

. 
. * ---- Services and rights ----------------------------------------------------
. local lbl_jeea_index_services   "Services index (SD)"
r; t=0.00 13:02:15

. local lbl_sisben                "SISBEN registration [=1]"
r; t=0.00 13:02:15

. local lbl_subs                  "Subsidized health [=1]"
r; t=0.00 13:02:15

. local lbl_bank                  "Savings account [=1]"
r; t=0.00 13:02:15

. local lbl_has_bank_account      "Bank account (incl. savings) [=1]"
r; t=0.00 13:02:15

. local lbl_govtr                 "Govt. transfers [=1]"
r; t=0.00 13:02:15

. 
. * ---- Health -----------------------------------------------------------------
. local lbl_health_pca            "Health PCA index (SD)"
r; t=0.00 13:02:15

. local lbl_anx_depr              "Severe anxiety/depression [=1]"
r; t=0.00 13:02:15

. local lbl_any_anx_depr          "Any anxiety/depression [=1]"
r; t=0.00 13:02:15

. local lbl_vas_score             "Self-rated health (0-100)"
r; t=0.00 13:02:15

. local lbl_phys_problem          "Physical health problem [=1]"
r; t=0.00 13:02:15

. local lbl_chronic_illness       "Chronic illness [=1]"
r; t=0.00 13:02:15

. local lbl_mh_index              "Mental-health composite (SD)"
r; t=0.00 13:02:15

. local lbl_life_satisfaction     "Life satisfaction (0-10)"
r; t=0.00 13:02:15

. local lbl_hi5_inv               "EQ-5D anx/depr (5-low to 1-high)"
r; t=0.00 13:02:15

. 
. * ---- Food security ----------------------------------------------------------
. local lbl_index_food            "Food security index (SD)"
r; t=0.00 13:02:15

. local lbl_skip_meals            "Skipped meals last month [=1]"
r; t=0.00 13:02:15

. local lbl_went_without_food     "Went without food [=1]"
r; t=0.00 13:02:15

. local lbl_protein_days          "Days w/ protein (last week)"
r; t=0.00 13:02:15

. local lbl_food_insecure_seek    "Sought food assistance [=1]"
r; t=0.00 13:02:15

. 
. * ---- Housing ----------------------------------------------------------------
. local lbl_index_housing         "Housing quality index (SD)"
r; t=0.00 13:02:15

. local lbl_adequate_housing      "Adequate housing [=1]"
r; t=0.00 13:02:15

. local lbl_has_electricity       "Has electricity [=1]"
r; t=0.00 13:02:15

. local lbl_has_water             "Has running water [=1]"
r; t=0.00 13:02:15

. local lbl_has_sewage            "Has sewage [=1]"
r; t=0.00 13:02:15

. 
. * ---- Integration ------------------------------------------------------------
. local lbl_index_integration     "Integration index (SD)"
r; t=0.00 13:02:15

. local lbl_belonging             "Sense of belonging (1-4)"
r; t=0.00 13:02:15

. local lbl_feel_integrated       "Feels integrated (1-4)"
r; t=0.00 13:02:15

. local lbl_trust_col             "Trust in Colombians (out-group, 1-5)"
r; t=0.00 13:02:15

. local lbl_trust_ven             "Trust in Venezuelans (in-group, 1-5)"
r; t=0.00 13:02:15

. local lbl_general_trust         "General trust in people (1-5)"
r; t=0.00 13:02:15

. local lbl_venezuelans_help_me   "Venezuelans help me (1-5)"
r; t=0.00 13:02:15

. local lbl_trust_index           "Prosocial behaviors composite (SD)"
r; t=0.00 13:02:15

. local lbl_col_friends           "Number Colombian friends"
r; t=0.00 13:02:15

. local lbl_community_org         "Belongs to community org [=1]"
r; t=0.00 13:02:15

. local lbl_connection_colombia   "Strong connection to Colombia [=1]"
r; t=0.00 13:02:15

. local lbl_colombians_help_me    "Colombians help me (1-5)"
r; t=0.00 13:02:15

. local lbl_count_on_col          "Can count on Colombians (1-5)"
r; t=0.00 13:02:15

. 
. * ---- Discrimination ---------------------------------------------------------
. local lbl_index_discrim         "Discrimination index (SD)"
r; t=0.00 13:02:15

. local lbl_discrim_ever          "Ever discriminated against [=1]"
r; t=0.00 13:02:15

. local lbl_discrim_freq          "Discrimination frequency (1-5)"
r; t=0.00 13:02:15

. local lbl_filed_complaint       "Filed discrimination complaint [=1]"
r; t=0.00 13:02:15

. 
. * ---- Migration intentions ---------------------------------------------------
. local lbl_intend_stay           "Intends to stay in Colombia [=1]"
r; t=0.00 13:02:15

. local lbl_plan_stay_5yr         "Plans to stay 5+ years [=1]"
r; t=0.00 13:02:15

. local lbl_considered_return_ven "Considered returning to Venezuela [=1]"
r; t=0.00 13:02:15

. 
. * ---- COVID -----------------------------------------------------------------
. local lbl_index_covid           "COVID resilience index (SD)"
r; t=0.00 13:02:15

. local lbl_covid_income_down     "Income fell during COVID [=1]"
r; t=0.00 13:02:15

. local lbl_covid_eviction        "Faced eviction during COVID [=1]"
r; t=0.00 13:02:15

. local lbl_covid_received_aid    "Received COVID aid [=1]"
r; t=0.00 13:02:15

. 
. * ---- Education -------------------------------------------------------------
. local lbl_currently_studying    "Currently studying [=1]"
r; t=0.00 13:02:15

. local lbl_currently_enrolled    "Currently enrolled in school [=1]"
r; t=0.00 13:02:15

. local lbl_degree_validated      "Foreign degree validated [=1]"
r; t=0.00 13:02:15

. 
. * ---- Children --------------------------------------------------------------
. local lbl_child_skip_meals      "Child skipped meals [=1]"
r; t=0.00 13:02:15

. local lbl_child_vaccinated      "Child vaccinated [=1]"
r; t=0.00 13:02:15

. local lbl_child_worked          "Child worked [=1]"
r; t=0.00 13:02:15

. 
. * ---- Remittances -----------------------------------------------------------
. local lbl_index_remit           "Remittances index (SD)"
r; t=0.00 13:02:15

. local lbl_remit_now             "Sends remittances now [=1]"
r; t=0.00 13:02:15

. local lbl_remit_to_parents      "Remits to parents [=1]"
r; t=0.00 13:02:15

. 
. * ---- Financial access and digital ------------------------------------------
. local lbl_index_fin_access      "Financial access index (SD)"
r; t=0.00 13:02:15

. local lbl_index_digital         "Digital access index (SD)"
r; t=0.00 13:02:15

. local lbl_has_savings_account   "Has savings account [=1]"
r; t=0.00 13:02:15

. local lbl_has_mobile_money      "Has mobile money [=1]"
r; t=0.00 13:02:15

. local lbl_has_smartphone        "Has smartphone [=1]"
r; t=0.00 13:02:15

. local lbl_has_internet          "Has internet [=1]"
r; t=0.00 13:02:15

. local lbl_apps_whatsapp         "Uses WhatsApp [=1]"
r; t=0.00 13:02:15

. 
. * ============================================================================
. *  PREDETERMINED COVARIATES (used for balance tests and as RD controls)
. * ============================================================================
. 
. * ---- Demographics ----------------------------------------------------------
. local lbl_female                "Female [=1]"
r; t=0.00 13:02:15

. local lbl_age_panel             "Age (years)"
r; t=0.00 13:02:15

. local lbl_yrseduc               "Years of education"
r; t=0.00 13:02:15

. local lbl_time_col              "Years in Colombia"
r; t=0.00 13:02:15

. local lbl_child_venez           "Has child born in Venezuela [=1]"
r; t=0.00 13:02:15

. 
. * ---- Pre-migration economic conditions (in Venezuela) ----------------------
. local lbl_jobopp                "Had a job offer in Colombia [=1]"
r; t=0.00 13:02:15

. local lbl_labven                "Worked in Venezuela [=1]"
r; t=0.00 13:02:15

. local lbl_typeworkven1          "Worked in agric./manual (VZ) [=1]"
r; t=0.00 13:02:15

. local lbl_typeworkven2          "Worked in services (VZ) [=1]"
r; t=0.00 13:02:15

. local lbl_typeworkven3          "Worked in skilled occ. (VZ) [=1]"
r; t=0.00 13:02:15

. local lbl_written_cont          "Had written contract (VZ) [=1]"
r; t=0.00 13:02:15

. local lbl_average               "Avg. days worked / week (VZ)"
r; t=0.00 13:02:15

. local lbl_smartven              "Owned smartphone in VZ [=1]"
r; t=0.00 13:02:15

. local lbl_owner                 "Homeowner in VZ [=1]"
r; t=0.00 13:02:15

. local lbl_electven              "Had electricity in VZ [=1]"
r; t=0.00 13:02:15

. local lbl_waterven              "Had running water in VZ [=1]"
r; t=0.00 13:02:15

. local lbl_sewageven             "Had sewage in VZ [=1]"
r; t=0.00 13:02:15

. 
. * ---- Family / migration network -------------------------------------------
. local lbl_hhven_parents         "Parents born in VZ [=1]"
r; t=0.00 13:02:15

. local lbl_hhven_spouse          "Spouse born in VZ [=1]"
r; t=0.00 13:02:15

. local lbl_hhven_other           "Other HH members born in VZ [=1]"
r; t=0.00 13:02:15

. local lbl_healthmig             "Healthy at migration [=1]"
r; t=0.00 13:02:15

. local lbl_frdfam                "Network in Colombia [=1]"
r; t=0.00 13:02:15

. r; t=0.01 13:02:15

. 
. di "=================================================================="
==================================================================
r; t=0.00 13:02:15

. di "  12b_AppendixTables.do  —  $S_DATE  $S_TIME"
  12b_AppendixTables.do  —  25 Jun 2026  13:02:15
r; t=0.00 13:02:15

. di "=================================================================="
==================================================================
r; t=0.00 13:02:15

. 
. /*==============================================================================
>   HELPERS
> ==============================================================================*/
. 
. * Format coef with stars
. capture program drop _coef
r; t=0.00 13:02:15

. program define _coef, rclass
  1.     args b se p
  2.     local s = ""
  3.     if "`p'" != "" & "`p'" != "." & `p' < 0.10 local s "\sym{+}"
  4.     if "`p'" != "" & "`p'" != "." & `p' < 0.05 local s "\sym{*}"
  5.     if "`p'" != "" & "`p'" != "." & `p' < 0.01 local s "\sym{**}"
  6.     if "`b'" == "" | "`b'" == "." {
  7.         return local cell ""
  8.     }
  9.     else {
 10.         return local cell = string(`b', "%6.3f") + "`s'"
 11.     }
 12.     if "`se'" == "" | "`se'" == "." {
 13.         return local secell ""
 14.     }
 15.     else {
 16.         return local secell = "(" + string(`se', "%6.3f") + ")"
 17.     }
 18. end
r; t=0.00 13:02:15

. 
. /*==============================================================================
>   B.1 — Per-covariate balance table (all 21 covariates)
> ==============================================================================*/
. 
. di ""

r; t=0.00 13:02:15

. di "--- B.1: balance full ---"
--- B.1: balance full ---
r; t=0.00 13:02:15

. 
. import delimited "$out/05_Validity_BalanceLog.txt", clear delimiter(tab) ///
>     varnames(1) stringcols(1)
(encoding automatically selected: ISO-8859-1)
(9 vars, 20 obs)
r; t=0.13 13:02:15

. destring w1_b w1_se w1_p w1_n w2_b w2_se w2_p w2_n, replace force
w1_b already numeric; no replace
w1_se already numeric; no replace
w1_p already numeric; no replace
w1_n already numeric; no replace
w2_b already numeric; no replace
w2_se already numeric; no replace
w2_p already numeric; no replace
w2_n already numeric; no replace
r; t=0.00 13:02:15

. 
. * Drop electven (had electricity in Venezuela): the variable has a
. * coding problem and is not used in the analysis.
. drop if variable == "electven"
(1 observation deleted)
r; t=0.00 13:02:15

. 
. file open T using "$atab/tabA_balance_full.tex", write replace text
r; t=0.01 13:02:15

. file write T "\begin{table}[!htbp]" _n
r; t=0.00 13:02:15

. file write T "\centering" _n
r; t=0.00 13:02:15

. file write T "\caption{Per-covariate balance at the cutoff (full)}" _n
r; t=0.00 13:02:15

. file write T "\label{tab:balance_full}" _n
r; t=0.00 13:02:15

. file write T "\begin{threeparttable}" _n
r; t=0.00 13:02:15

. file write T "\begin{tabular}{l*{6}{c}}" _n
r; t=0.00 13:02:15

. file write T "\toprule" _n
r; t=0.00 13:02:15

. file write T " & \multicolumn{3}{c}{Wave 1 (2020)} & \multicolumn{3}{c}{Wave 2 (2021)} \\" _n
r; t=0.00 13:02:15

. file write T "\cmidrule(lr){2-4} \cmidrule(lr){5-7}" _n
r; t=0.00 13:02:15

. file write T " & Coef. & SE & \$p\$ & Coef. & SE & \$p\$ \\" _n
r; t=0.00 13:02:15

. file write T " & (1) & (2) & (3) & (4) & (5) & (6) \\" _n
r; t=0.00 13:02:15

. file write T "\midrule" _n
r; t=0.00 13:02:15

. file write T "\multicolumn{7}{l}{\textit{Panel A. Sharp-RD coefficient on each predetermined covariate at the cuto
> ff}} \\" _n
r; t=0.00 13:02:15

. file write T "\addlinespace[0.2em]" _n
r; t=0.00 13:02:15

. 
. forvalues r = 1/`=_N' {
  2.     local nm     = variable[`r']
  3.     local pretty "`lbl_`nm''"
  4.     if "`pretty'" == "" local pretty "`nm'"
  5. 
.     local b1 = w1_b[`r']
  6.     local s1 = w1_se[`r']
  7.     local p1 = w1_p[`r']
  8.     local b2 = w2_b[`r']
  9.     local s2 = w2_se[`r']
 10.     local p2 = w2_p[`r']
 11. 
.     _coef `b1' `s1' `p1'
 12.     local c1b "`r(cell)'"
 13.     _coef `b2' `s2' `p2'
 14.     local c2b "`r(cell)'"
 15. 
.     file write T "`pretty' & `c1b' & " "`=string(`s1', "%6.3f")'" " & " "`=string(`p1', "%6.3f")'"
 16.     file write T " & `c2b' & " "`=string(`s2', "%6.3f")'" " & " "`=string(`p2', "%6.3f")'"
 17.     file write T " \\" _n
 18. }
r; t=0.00 13:02:15

. 
. * Joint F-test of all covariates predicting eligibility (date >= 0).  Run on
. * the JEEA-style sample, separately by wave.
. preserve
r; t=0.00 13:02:15

. use "$clean/PEP_Analysis_Sample.dta", clear
(PEP analysis sample (JEEA-style + extended outcome indices))
r; t=0.13 13:02:15

. local jeea_controls hhven_spouse hhven_other jobopp labven typeworkven1 ///
>                     typeworkven2 typeworkven3 written_cont average yrseduc ///
>                     healthmig frdfam smartven owner electven waterven ///
>                     sewageven female age_panel child_venez time_col
r; t=0.00 13:02:15

. gen sample_roster = .
(13,580 missing values generated)
r; t=0.00 13:02:15

. qui reg trt_hh `jeea_controls'
r; t=2.45 13:02:18

. replace sample_roster = e(sample)
(13,580 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if gasto_capita == . & trt_hh != .
(119 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if employed == . & trt_hh != .
(88 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if hora_semana == . & trt_hh != . & asalariado_num == 1
(64 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if anx_depr == .
(2 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if health_pca == .
(8 real changes made)
r; t=0.00 13:02:18

. bysort family_id wave_num: egen sample_reg = max(sample_roster)
r; t=0.02 13:02:18

. keep if (orden == 1 | orden == 2) & sample_reg == 1
(6,604 observations deleted)
r; t=0.02 13:02:18

. gen rd_above = (date >= 0) if !missing(date)
r; t=0.00 13:02:18

. 
. * Joint F at multiple bandwidths so the reader sees how local imbalance
. * changes as the window narrows toward the cutoff.  Local randomness
. * requires balance as h -> 0, so a falling p-value with smaller h is
. * the relevant evidence for the RD identification.
. * Excludes electven (coded inconsistently) from the joint F.
. local jeea_controls_balance hhven_spouse hhven_other jobopp labven ///
>                             typeworkven1 typeworkven2 typeworkven3 ///
>                             written_cont average yrseduc healthmig frdfam ///
>                             smartven owner waterven sewageven female ///
>                             age_panel child_venez time_col
r; t=0.00 13:02:18

. foreach h in 100 60 40 {
  2.     foreach w in 1 2 {
  3.         local jt_F_`w'_h`h' .
  4.         local jt_p_`w'_h`h' .
  5.         capture qui reg rd_above `jeea_controls_balance' date if wave_num == `w' & abs(date) <= `h'
  6.         if !_rc {
  7.             capture qui test `jeea_controls_balance'
  8.             if !_rc {
  9.                 local jt_F_`w'_h`h' = r(F)
 10.                 local jt_p_`w'_h`h' = r(p)
 11.             }
 12.         }
 13.     }
 14. }
r; t=0.09 13:02:18

. restore
r; t=0.01 13:02:18

. 
. file write T "\midrule" _n
r; t=0.00 13:02:18

. file write T "\multicolumn{7}{l}{\textit{Panel B. Joint balance test (regression of eligibility indicator on all l
> isted covariates within \$|date|\leq 40\$ days)}} \\" _n
r; t=0.00 13:02:18

. file write T "\addlinespace[0.2em]" _n
r; t=0.00 13:02:18

. local f1_str = cond(`jt_F_1_h40' == ., "---", string(`jt_F_1_h40', "%5.3f"))
r; t=0.00 13:02:18

. local p1_str = cond(`jt_p_1_h40' == ., "---", string(`jt_p_1_h40', "%5.3f"))
r; t=0.00 13:02:18

. local f2_str = cond(`jt_F_2_h40' == ., "---", string(`jt_F_2_h40', "%5.3f"))
r; t=0.00 13:02:18

. local p2_str = cond(`jt_p_2_h40' == ., "---", string(`jt_p_2_h40', "%5.3f"))
r; t=0.00 13:02:18

. file write T "\$F\$-statistic" ///
>     " & \multicolumn{3}{c}{`f1_str'}" ///
>     " & \multicolumn{3}{c}{`f2_str'}" " \\" _n
r; t=0.00 13:02:18

. file write T "\$p\$-value (null: covariates do not predict eligibility)" ///
>     " & \multicolumn{3}{c}{`p1_str'}" ///
>     " & \multicolumn{3}{c}{`p2_str'}" " \\" _n
r; t=0.00 13:02:18

. file write T "\bottomrule" _n
r; t=0.00 13:02:18

. file write T "\end{tabular}" _n
r; t=0.00 13:02:18

. file write T "\begin{tablenotes}\footnotesize" _n
r; t=0.00 13:02:18

. file write T "\item \textit{Notes}: This table reports a sharp regression-discontinuity estimate at the RAMV cutof
> f for each predetermined covariate, separately by wave. Each cell is the jump in the covariate at the cutoff under
>  \texttt{rdrobust} at the MSE-optimal bandwidth with triangular kernel and local-linear polynomial (\$p=1\$); colu
> mns 2 and 5 give conventional standard errors and columns 3 and 6 give the corresponding two-sided \$p\$-value. Th
> e running variable is days from the RAMV deadline (June 8, 2018), reflected so positive values indicate eligibilit
> y. The sample is the JEEA-style analysis sample described in Online Appendix~\ref{app:data}. Under continuity of p
> otential outcomes, none of the predetermined covariates should jump at the cutoff; one or two rejections at the 5\
> % level are expected by chance for the 21 covariates tested. Significance: \sym{+} \$p<0.10\$, \sym{*} \$p<0.05\$,
>  \sym{**} \$p<0.01\$." _n
r; t=0.00 13:02:18

. file write T "\end{tablenotes}" _n
r; t=0.00 13:02:18

. file write T "\end{threeparttable}" _n
r; t=0.00 13:02:18

. file write T "\end{table}" _n
r; t=0.00 13:02:18

. file close T
r; t=0.00 13:02:18

. 
. di "  tabA_balance_full.tex saved"
  tabA_balance_full.tex saved
r; t=0.00 13:02:18

. 
. /*==============================================================================
>   B.4 — First-stage table (numerical)
> ==============================================================================*/
. 
. di ""

r; t=0.00 13:02:18

. di "--- B.4: first stage table ---"
--- B.4: first stage table ---
r; t=0.00 13:02:18

. 
. use "$clean/PEP_Analysis_Sample.dta", clear
(PEP analysis sample (JEEA-style + extended outcome indices))
r; t=0.13 13:02:18

. 
. local jeea_controls hhven_spouse hhven_other jobopp labven ///
>                     typeworkven1 typeworkven2 typeworkven3 ///
>                     written_cont average yrseduc healthmig frdfam ///
>                     smartven owner electven waterven sewageven female ///
>                     age_panel child_venez time_col
r; t=0.00 13:02:18

. 
. gen sample_roster = .
(13,580 missing values generated)
r; t=0.00 13:02:18

. qui reg trt_hh `jeea_controls'
r; t=0.01 13:02:18

. replace sample_roster = e(sample)
(13,580 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if gasto_capita == . & trt_hh != .
(119 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if employed == . & trt_hh != .
(88 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if hora_semana == . & trt_hh != . & asalariado_num == 1
(64 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if anx_depr == .
(2 real changes made)
r; t=0.00 13:02:18

. replace sample_roster = 0 if health_pca == .
(8 real changes made)
r; t=0.00 13:02:18

. bysort family_id: egen sample_reg = max(sample_roster)
r; t=0.01 13:02:18

. keep if (orden == 1 | orden == 2) & sample_reg == 1
(6,451 observations deleted)
r; t=0.02 13:02:18

. 
. foreach trt in pep trt_hh {
  2.     foreach w in 1 2 {
  3.         capture rdrobust `trt' date if wave_num == `w', c(0) ///
>             kernel(triangular) bwselect(mserd) p(1)
  4.         if !_rc {
  5.             local b_`trt'_`w'  = e(tau_cl)
  6.             local s_`trt'_`w'  = e(se_tau_cl)
  7.             local p_`trt'_`w'  = e(pv_cl)
  8.             local n_`trt'_`w'  = e(N_h_l) + e(N_h_r)
  9.         }
 10.     }
 11. }
r; t=0.99 13:02:19

. 
. file open T using "$atab/tabA_first_stage.tex", write replace text
(file ../outputs/appendix/tables/tabA_first_stage.tex not found)
r; t=0.00 13:02:19

. file write T "\begin{table}[!htbp]" _n
r; t=0.00 13:02:19

. file write T "\centering" _n
r; t=0.00 13:02:19

. file write T "\caption{First-stage estimates: PEP-RAMV take-up at the cutoff}" _n
r; t=0.00 13:02:19

. file write T "\label{tab:first_stage}" _n
r; t=0.00 13:02:19

. file write T "\begin{threeparttable}" _n
r; t=0.00 13:02:19

. file write T "\begin{tabular}{lcccc}" _n
r; t=0.00 13:02:19

. file write T "\toprule" _n
r; t=0.00 13:02:19

. file write T " & \multicolumn{2}{c}{Individual PEP} & \multicolumn{2}{c}{Household PEP (any)} \\" _n
r; t=0.00 13:02:19

. file write T "\cmidrule(lr){2-3} \cmidrule(lr){4-5}" _n
r; t=0.00 13:02:19

. file write T " & Wave 1 & Wave 2 & Wave 1 & Wave 2 \\" _n
r; t=0.00 13:02:19

. file write T " & (1) & (2) & (3) & (4) \\" _n
r; t=0.00 13:02:19

. file write T "\midrule" _n
r; t=0.00 13:02:19

. 
. _coef `b_pep_1' `s_pep_1' `p_pep_1'
r; t=0.00 13:02:19

. local c1 "`r(cell)'"
r; t=0.00 13:02:19

. local sec1 "`r(secell)'"
r; t=0.00 13:02:19

. _coef `b_pep_2' `s_pep_2' `p_pep_2'
r; t=0.00 13:02:19

. local c2 "`r(cell)'"
r; t=0.00 13:02:19

. local sec2 "`r(secell)'"
r; t=0.00 13:02:19

. _coef `b_trt_hh_1' `s_trt_hh_1' `p_trt_hh_1'
r; t=0.00 13:02:19

. local c3 "`r(cell)'"
r; t=0.00 13:02:19

. local sec3 "`r(secell)'"
r; t=0.00 13:02:19

. _coef `b_trt_hh_2' `s_trt_hh_2' `p_trt_hh_2'
r; t=0.00 13:02:19

. local c4 "`r(cell)'"
r; t=0.00 13:02:19

. local sec4 "`r(secell)'"
r; t=0.00 13:02:19

. 
. file write T "Eligibility & `c1' & `c2' & `c3' & `c4' \\" _n
r; t=0.00 13:02:19

. file write T " & `sec1' & `sec2' & `sec3' & `sec4' \\[0.4em]" _n
r; t=0.00 13:02:19

. file write T "Observations (effective)"
r; t=0.00 13:02:19

. file write T " & `n_pep_1' & `n_pep_2' & `n_trt_hh_1' & `n_trt_hh_2' \\" _n
r; t=0.00 13:02:19

. file write T "\bottomrule" _n
r; t=0.00 13:02:19

. file write T "\end{tabular}" _n
r; t=0.00 13:02:19

. file write T "\begin{tablenotes}\footnotesize" _n
r; t=0.00 13:02:19

. file write T "\item \textit{Notes}: This table reports the first-stage discontinuity in PEP-RAMV take-up at the RA
> MV registration deadline. Each column is a separate \texttt{rdrobust} regression of a take-up indicator on the eli
> gibility instrument (date \$\geq 0\$ after reflection), with triangular kernel, MSE-optimal bandwidth, and local-l
> inear polynomial (\$p=1\$). Columns 1--2 use the individual PEP indicator (= 1 if the individual is personally reg
> istered) and columns 3--4 use the household PEP indicator (= 1 if any household member is registered). The point e
> stimate is the size of the take-up jump at the cutoff and corresponds to the denominator of the fuzzy RD estimator
> . Conventional standard errors are in parentheses; \textquotedblleft Observations (effective)\textquotedblright\ i
> s the number of observations within the optimal bandwidth on each side of the cutoff. Significance: \sym{+} \$p<0.
> 10\$, \sym{*} \$p<0.05\$, \sym{**} \$p<0.01\$." _n
r; t=0.00 13:02:19

. file write T "\end{tablenotes}" _n
r; t=0.00 13:02:19

. file write T "\end{threeparttable}" _n
r; t=0.00 13:02:19

. file write T "\end{table}" _n
r; t=0.00 13:02:19

. file close T
r; t=0.00 13:02:19

. 
. di "  tabA_first_stage.tex saved"
  tabA_first_stage.tex saved
r; t=0.00 13:02:19

. 
. /*==============================================================================
>   C.1 — Full RD tables by theme
> 
>   Uses 07_RD_W1_W2_results.txt; 4 columns (W1 NC, W1 +X, W2 NC, W2 +X);
>   one .tex file per theme.
> ==============================================================================*/
. 
. di ""

r; t=0.00 13:02:19

. di "--- C.1: full RD tables by theme ---"
--- C.1: full RD tables by theme ---
r; t=0.00 13:02:19

. 
. import delimited "$out/07_RD_W1_W2_results.txt", clear delimiter(tab) ///
>     varnames(1) stringcols(1 2 3 4)
(encoding automatically selected: ISO-8859-1)
(14 vars, 260 obs)
r; t=0.10 13:02:19

. destring coef se p n_eff, replace force
coef already numeric; no replace
se already numeric; no replace
p already numeric; no replace
n_eff already numeric; no replace
r; t=0.00 13:02:19

. 
. tempfile rd_long
r; t=0.00 13:02:19

. save `rd_long'
file C:\Users\wb614536\AppData\Local\Temp\ST_7cc4_000002.tmp saved as .dta format
r; t=0.01 13:02:19

. 
. * Helper: pull a single (b, s, p, n)
. capture program drop _get_cell
r; t=0.00 13:02:19

. program define _get_cell, rclass
  1.     args var wave spec
  2.     local b = .
  3.     local s = .
  4.     local p = .
  5.     local n = .
  6.     quietly {
  7.         preserve
  8.         keep if outcome == "`var'" & wave == "`wave'" & spec == "`spec'"
  9.         if _N == 1 {
 10.             local b = coef[1]
 11.             local s = se[1]
 12.             local p = p[1]
 13.             local n = n_eff[1]
 14.         }
 15.         restore
 16.     }
 17.     return scalar b = `b'
 18.     return scalar s = `s'
 19.     return scalar p = `p'
 20.     return scalar n = `n'
 21. end
r; t=0.00 13:02:19

. 
. capture program drop _print_rd_row
r; t=0.00 13:02:19

. program define _print_rd_row
  1.     args fhandle var label
  2.     local cells_b ""
  3.     local cells_se ""
  4.     foreach wv in W1 W2 {
  5.         _get_cell `var' `wv' "no_ctrls"
  6.         _coef `r(b)' `r(s)' `r(p)'
  7.         local cells_b  "`cells_b' & `r(cell)'"
  8.         local cells_se "`cells_se' & `r(secell)'"
  9.     }
 10.     file write `fhandle' "`label'" "`cells_b'" " \\" _n
 11.     file write `fhandle' " " "`cells_se'" " \\[0.2em]" _n
 12. end
r; t=0.00 13:02:19

. 
. * Themes with their outcome lists
. local themes  economic labor services health food housing integration ///
>               discrim migration covid education remittance
r; t=0.00 13:02:19

. local title_economic    "Economic well-being"
r; t=0.00 13:02:19

. local title_labor       "Labor market"
r; t=0.00 13:02:19

. local title_services    "Services and rights"
r; t=0.00 13:02:19

. local title_health      "Health"
r; t=0.00 13:02:19

. local title_food        "Food security"
r; t=0.00 13:02:19

. local title_housing     "Housing"
r; t=0.00 13:02:19

. local title_integration "Integration and trust"
r; t=0.00 13:02:19

. local title_discrim     "Discrimination"
r; t=0.00 13:02:19

. local title_migration   "Migration intentions"
r; t=0.00 13:02:19

. local title_covid       "COVID resilience"
r; t=0.00 13:02:19

. local title_education   "Education"
r; t=0.00 13:02:19

. local title_remittance  "Remittances"
r; t=0.00 13:02:19

. local title_digital     "Financial access and digital"
r; t=0.00 13:02:19

. 
. local out_economic    jeea_index_wellbeing labour_income gasto_capita income_maxhh employed
r; t=0.00 13:02:19

. local out_labor       jeea_index_labor formal hora_semana
r; t=0.00 13:02:19

. local out_services    jeea_index_services sisben subs bank govtr
r; t=0.00 13:02:19

. local out_health      health_pca hi5_inv vas_score
r; t=0.00 13:02:19

. local out_food        index_food skip_meals went_without_food protein_days food_insecure_seek
r; t=0.00 13:02:19

. local out_housing     index_housing adequate_housing has_electricity has_water has_sewage
r; t=0.00 13:02:19

. local out_integration index_integration belonging feel_integrated trust_col col_friends community_org connection_c
> olombia
r; t=0.00 13:02:19

. local out_discrim     index_discrim discrim_ever discrim_freq filed_complaint
r; t=0.00 13:02:19

. local out_migration   intend_stay plan_stay_5yr considered_return_ven
r; t=0.00 13:02:19

. local out_covid       index_covid covid_received_aid covid_income_down covid_eviction
r; t=0.00 13:02:19

. local out_education   currently_studying currently_enrolled degree_validated
r; t=0.00 13:02:19

. local out_remittance  index_remit remit_now remit_to_parents
r; t=0.00 13:02:19

. local out_digital     index_fin_access index_digital has_savings_account has_smartphone has_internet apps_whatsapp
r; t=0.00 13:02:19

. 
. foreach t of local themes {
  2.     use `rd_long', clear
  3.     local title "`title_`t''"
  4.     local outvars `out_`t''
  5. 
.     file open T using "$atab/tabA_rd_full_`t'.tex", write replace text
  6.     file write T "\begin{table}[!htbp]" _n
  7.     file write T "\centering" _n
  8.     file write T "\caption{Fuzzy RD estimates: `title' (full)}" _n
  9.     file write T "\label{tab:rd_full_`t'}" _n
 10.     file write T "\begin{threeparttable}" _n
 11.     file write T "\begin{tabular}{l*{2}{c}}" _n
 12.     file write T "\toprule" _n
 13.     file write T " & Wave 1 (2020) & Wave 2 (2021) \\" _n
 14.     file write T " & (1) & (2) \\" _n
 15.     file write T "\midrule" _n
 16. 
.     foreach v of local outvars {
 17.         local pretty "`lbl_`v''"
 18.         if "`pretty'" == "" local pretty "`v'"
 19.         _print_rd_row T `v' "`pretty'"
 20.     }
 21. 
.     file write T "\bottomrule" _n
 22.     file write T "\end{tabular}" _n
 23.     file write T "\begin{tablenotes}\footnotesize" _n
 24.     file write T "\item \textit{Notes}: This table reports fuzzy regression-discontinuity estimates for every o
> utcome we construct within the theme indicated in the title. Each cell is a coefficient from \texttt{rdrobust} est
> imated at the MSE-optimal bandwidth with triangular kernel and local-linear polynomial (\$p=1\$); conventional sta
> ndard errors are in parentheses on the row below. The instrument is the eligibility indicator (date \$\geq 0\$ aft
> er reflection); treatment is the household PEP indicator for household-level outcomes (per-capita consumption, hou
> sehold-max labor income, bank account, government transfers, remittances) and the individual PEP indicator otherwi
> se. No covariate adjustment is applied. Outcomes labeled \textquotedblleft (SD)\textquotedblright\ are standardize
> d to the within-wave control mean and standard deviation; outcomes labeled \textquotedblleft [=1]\textquotedblrigh
> t\ are 0/1 indicators; remaining variables are in the natural units indicated. Significance: \sym{+} \$p<0.10\$, \
> sym{*} \$p<0.05\$, \sym{**} \$p<0.01\$." _n
 25.     file write T "\end{tablenotes}" _n
 26.     file write T "\end{threeparttable}" _n
 27.     file write T "\end{table}" _n
 28.     file close T
 29. 
.     di "  tabA_rd_full_`t'.tex saved"
 30. }
(file ../outputs/appendix/tables/tabA_rd_full_economic.tex not found)
  tabA_rd_full_economic.tex saved
(file ../outputs/appendix/tables/tabA_rd_full_labor.tex not found)
  tabA_rd_full_labor.tex saved
(file ../outputs/appendix/tables/tabA_rd_full_services.tex not found)
  tabA_rd_full_services.tex saved
(file ../outputs/appendix/tables/tabA_rd_full_health.tex not found)
  tabA_rd_full_health.tex saved
(file ../outputs/appendix/tables/tabA_rd_full_food.tex not found)
  tabA_rd_full_food.tex saved
(file ../outputs/appendix/tables/tabA_rd_full_housing.tex not found)
  tabA_rd_full_housing.tex saved
(file ../outputs/appendix/tables/tabA_rd_full_integration.tex not found)
  tabA_rd_full_integration.tex saved
  tabA_rd_full_discrim.tex saved
  tabA_rd_full_migration.tex saved
(file ../outputs/appendix/tables/tabA_rd_full_covid.tex not found)
  tabA_rd_full_covid.tex saved
  tabA_rd_full_education.tex saved
  tabA_rd_full_remittance.tex saved
r; t=0.28 13:02:19

. 
. /*==============================================================================
>   D.2 — Lee bounds for all W2 outcomes
> ==============================================================================*/
. 
. di ""

r; t=0.00 13:02:19

. di "--- D.2: Lee bounds full ---"
--- D.2: Lee bounds full ---
r; t=0.00 13:02:19

. 
. import delimited "$out/08_LeeBounds_W2_results.txt", clear delimiter(tab) ///
>     varnames(1) stringcols(1 2)
(encoding automatically selected: ISO-8859-1)
(7 vars, 45 obs)
r; t=0.04 13:02:19

. destring point lower upper trim_q n_eff, replace force
point already numeric; no replace
lower already numeric; no replace
upper already numeric; no replace
trim_q already numeric; no replace
n_eff already numeric; no replace
r; t=0.00 13:02:19

. 
. gen robust = (lower > 0 & upper > 0) | (lower < 0 & upper < 0) ///
>     if !missing(lower, upper)
r; t=0.00 13:02:19

. 
. file open T using "$atab/tabA_leebounds_full.tex", write replace text
r; t=0.01 13:02:19

. file write T "\begin{table}[!htbp]" _n
r; t=0.00 13:02:19

. file write T "\centering" _n
r; t=0.00 13:02:19

. file write T "\caption{Lee (2009) bounds for all Wave-2 outcomes}" _n
r; t=0.00 13:02:19

. file write T "\label{tab:leebounds_full}" _n
r; t=0.00 13:02:19

. file write T "\begin{threeparttable}" _n
r; t=0.00 13:02:19

. file write T "\begin{tabular}{l*{5}{c}}" _n
r; t=0.00 13:02:19

. file write T "\toprule" _n
r; t=0.00 13:02:19

. file write T " & Point & Lower & Upper & Trim \$q\$ & Verdict \\" _n
r; t=0.00 13:02:19

. file write T " & (1) & (2) & (3) & (4) & (5) \\" _n
r; t=0.00 13:02:19

. file write T "\midrule" _n
r; t=0.00 13:02:19

. 
. forvalues r = 1/`=_N' {
  2.     local nm     = outcome[`r']
  3.     local pretty "`lbl_`nm''"
  4.     if "`pretty'" == "" local pretty "`nm'"
  5.     local pt = point[`r']
  6.     local lo = lower[`r']
  7.     local hi = upper[`r']
  8.     local tq = trim_q[`r']
  9.     local rb = robust[`r']
 10.     local verdict = cond(`rb' == 1, "robust", "crosses 0")
 11. 
.     file write T "`pretty'"
 12.     file write T " & " "`=string(`pt', "%6.3f")'"
 13.     file write T " & " "`=string(`lo', "%6.3f")'"
 14.     file write T " & " "`=string(`hi', "%6.3f")'"
 15.     file write T " & " "`=string(`tq', "%5.3f")'"
 16.     file write T " & `verdict' \\" _n
 17. }
r; t=0.00 13:02:19

. 
. file write T "\bottomrule" _n
r; t=0.00 13:02:19

. file write T "\end{tabular}" _n
r; t=0.00 13:02:19

. file write T "\begin{tablenotes}\footnotesize" _n
r; t=0.00 13:02:19

. file write T "\item \textit{Notes}: This table reports Lee (2009) rank-based trimming bounds on the Wave-2 fuzzy R
> D effect for every outcome, as a sensitivity check on selective attrition between the 2020 (Wave 1) and 2021 (Wave
>  2) survey rounds. Column 1 reports the unbounded \texttt{rdrobust} point estimate at the MSE-optimal bandwidth (t
> he same coefficient reported in main Tables~\ref{tab:rd_wellbeing}--\ref{tab:rd_food}). Columns 2--3 give Lee's lo
> wer and upper bound: one-sided trimming of the eligible group's outcome distribution by the differential-attrition
>  fraction, taken in either direction. Column 4 reports the trim fraction \$q\$ (the share trimmed); intuitively, l
> arger \$q\$ indicates more differential attrition and wider bounds. Column 5 classifies the bound as \textquotedbl
> left robust\textquotedblright\ if both bounds lie on the same side of zero, and \textquotedblleft crosses 0\textqu
> otedblright\ otherwise. Bounds are computed on the same JEEA-style analysis sample used throughout the paper." _n
r; t=0.00 13:02:19

. file write T "\end{tablenotes}" _n
r; t=0.00 13:02:19

. file write T "\end{threeparttable}" _n
r; t=0.00 13:02:19

. file write T "\end{table}" _n
r; t=0.00 13:02:19

. file close T
r; t=0.00 13:02:19

. 
. di "  tabA_leebounds_full.tex saved"
  tabA_leebounds_full.tex saved
r; t=0.00 13:02:19

. 
. 
. di ""

r; t=0.00 13:02:19

. di "=================================================================="
==================================================================
r; t=0.00 13:02:19

. di "  All appendix tables saved to $atab/"
  All appendix tables saved to ../outputs/appendix/tables/
r; t=0.00 13:02:19

. di "=================================================================="
==================================================================
r; t=0.00 13:02:19

. 
. log close
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/12b_AppendixTables_log.txt
  log type:  text
 closed on:  25 Jun 2026, 13:02:19
--------------------------------------------------------------------------------------------------------------------
